{extend name="$base" /}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="WAP_CSS/member_point.css">
{/block}
{block name="main"}
{php}
$point_config = api("System.Promotion.pointConfig");
$point_config = $point_config['data'];

// 会员账户信息
$member_account = api("System.Member.memberAccount");
$member_account = $member_account['data'];
{/php}
<div class="member-point">
    <div id="mescroll" class="mescroll" style="top: 44px;">

        <ul class="list-content">
        </ul>
    </div>
</div>
{/block}
{block name="footer"}{/block}

{block name="script"}
<script type="text/javascript">
    $(function(){
        mescroll = new ScrollList("mescroll", query_detail);
    });

    function query_detail(page_index, is_append)
    {
        var params = {page_index: page_index,account_type:3};
        var html = "";
        api("System.Member.messageList", params, function (res) {
            console.log(res)
            var list = res.data;
            if (list.data.length > 0) {
                $(list.data).each(function (i, v) {
                    html += '<div class="list-content-wrapper">';
                    html += '<div class="list-content-wrapper-top">';
                    html += '<div class="list-content-wrapper-top-left text16">我的反馈</div>';
                    if(v.status  === 1)
                    {
                        html += '<div class="list-content-wrapper-top-right"  style="color: green">已回复</div>';
                    }else{
                        html += '<div class="list-content-wrapper-top-right ns-text-color" >等待管理员回复</div>';
                    }


                    html += '</div>';
                    html += '<div class="list-content-wrapper-bottom">';
                    html += '<div class="list-content-wrapper-bottom-left ns-text-color-gray">' + v.message + '</div>';
                    html += '<div class="list-content-wrapper-bottom-right ns-text-color-gray">' + timeStampTurnTime(v.create_time) + '</div>';
                    html += '</div>';
                    html += '</div>';
                    if(v.status === 1){
                        html += '<div class="list-content-wrapper">';
                        html += '<div class="list-content-wrapper-bottom">';
                        html += '<div class="list-content-wrapper-bottom-left ns-text-color-gray">管理员回复</div>';
                        html += '<div class="list-content-wrapper-bottom-right ns-text-color-gray">' + timeStampTurnTime(v.reply_time) + '</div>';
                        html += '</div>';
                        html += v.reply;
                        html += '</div>';
                    }
                    html += '<div class="line"></div>';
                });
            } else {
                html += '<div class="list-empty-wrapper">';
                html += '<div>';
                html += '<div class="list-empty-img">';
                html += '<img src="' + WAPIMG + '/wap_nodata.png">';
                html += '</div>';
                html += '<div class="list-empty-text">';
                html += '暂无数据';
                html += '</div>';
                html += '</div>';
                html += '</div>';
            }

            if (is_append) $("#mescroll ul").append(html);
            else $("#mescroll ul").html(html);
            mescroll.endByPage(list.total_count, list.page_count);
        });
    }
</script>
{/block}